const {connction} = require('./db')
exMysql = (sql)=>{
    const promise = new Promise((resolve,reject,)=>{
        connction.query(sql,(err,result)=>{
            if(err){
                console.log('mysql错误---->',err);
                reject(err)
                return
            }
            // console.log('mysql 成功---->',result);
            resolve(result)
        })
    })
    return promise
}
module.exports ={
    exMysql
}